﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using HiCore.WebApi.Example.DbContexts.DbEntity;

namespace HiCore.WebApi.Example.DbContexts.Configurations
{
    internal class TestConfiguration : IEntityTypeConfiguration<TestTable>
    {
        public void Configure(EntityTypeBuilder<TestTable> builder)
        {
            builder
                .ConfigureAuditableEntityAggregateRoot()
                .Ignore(e => e.DomainEvents)
                .ToTable("aaaaaa_test")
                .HasKey(c => c.Id);

            //builder.Property(e => e.Id)
            //    .HasColumnName("id")
            //    .HasColumnType("bigint");

            //builder.Property(e => e.LoginName)
            //    .HasColumnName("LoginName")
            //    .HasColumnType("varchar(50)")
            //    .HasMaxLength(200)
            //    .IsRequired();
        }
    }
}
